<!--#begin delegationlist -->
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
	<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
	<tr class="BabSiteAdminTitleFontBackground"> 
		<td>{ delegtxt }</td>
		<td>{ delegdesctxt }</td>
		<td>{ grpmtxt }</td>
		<td align="right" width="10%">&nbsp;{ delegadmintxt }</td>
	</tr>
	<!--#in getnext -->
	<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
		<td><a href="{ url }">{ urltxt }</a></td>
		<td>{ delegval }</td>
		<td>{ grpmval }</td>
		<td align="right">&nbsp;<a href="{ urlmem }"><img src="{ babSkinPath }images/Puces/PuceUserAttrib.gif" alt="{ memberstxt }" border="0" /></a></td>
	</tr>
	<!--#endin getnext -->
	<tr class="BabSiteAdminTitleFontBackground"> 
		<td colspan="4"><a href="{ sAddUrl }" title="{ sAddCaption }">{ sAddCaption }</a></td>
	</tr>
	</table>
</td>
</tr>
</table>
<!--#end delegationlist -->

<!--#begin categorieslist -->
<form method="post" action="{ babPhpSelf }">
	<input type="hidden" name="tg" value="delegat" />
	<input type="hidden" name="idx" value="displayCategoriesListForm" />

	<table width="90%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center" valign="middle"> 
				<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
					<tr class="BabSiteAdminTitleFontBackground"> 
						<td  width="44%">{ nametxt }</td>
						<td  width="44%">{ desctxt }</td>
						<td  width="10%">{ bgcolortxt }</td>
						<td  width="2%">{ t_delete }</td>
					</tr>
						<!--#in getnext -->
						<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg --> 
						<td valign="middle" nowrap="nowrap"> 
						<a class="BabSiteAdminListLink" href="{ url }">{ urlname }</a> 
						</td>
						<td valign="middle">{ desc }</td>
						<td valign="middle" bgcolor="#{ bgcolor }"><span class="BabSiteAdminFont">{ bgcolor }</span></td>
						<td align="center"><input type="checkbox" name="delete_category[]" value="{ id_category }" /></td>
					</tr>
					<!--#endin getnext -->
					<tr class="BabSiteAdminTitleFontBackground">
						<td><a href="{ urladdcat }">{ add }</a></td>
						<td colspan="3">&nbsp;</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	
	<p style="text-align:center">
		<input type="submit" value="{ t_delete_checked }" onclick="return confirm(this.title)" title="{ t_confirm_delete }" />
	</p>
	
</form>
<!--#end categorieslist -->

<!--#begin categorycreate -->
<script type="text/javascript">
//<![CDATA[
function setColor(color)
	{
	document.forms.catcolor.bgcolor.value=color;
	if (color == '') color = 'fff';
	document.getElementById('evtColor').style.backgroundColor = '#'+color;
	}
//]]>
</script>
<form name="catcolor" method="post" action="{ babPhpSelf }">
	<input type="hidden" name="tg" value="{ tgval }" />
	<input type="hidden" name="idx" value="categoriesList" />
	<input type="hidden" name="idcat" value="{ idcat }" />
	<input type="hidden" name="action" value="{ add }" />
	<table width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center" valign="middle"> 
				<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
					<tr> 
						<td  width="30%" align="right" valign="middle">{ nametxt }:</td>
						<td  width="70%" valign="middle"> 
							<input type="text" name="catname" size="40" maxlength="60" value="{ name }" />
						</td>
					</tr>
					<tr> 
						<td align="right" valign="middle" nowrap="nowrap">{ desctxt }:</td>
						<td valign="middle"> 
							<input type="text" name="catdesc" size="50" maxlength="255" value="{ desc }" />
						</td>
					</tr>
					<tr> 
						<td align="right" valign="middle" nowrap="nowrap">{ bgcolortxt }:</td>
						<td valign="middle">
							<div id="evtColor" style="width:30px;height:15px;border:#000 1px solid;background-color:#{ bgcolor }; float:left"></div>&nbsp;<a class="BabSiteAdminListLink" href="#" onclick="Start('{ selctorurl }', 'ColorWindow', 'width=400,height=400,status=no,resizable=no,top=200,left=200');return false;"><img src="{ babSkinPath }images/Puces/colorize.png" alt="" border="0" /></a>
							<input type="hidden" name="bgcolor" value="{ bgcolor }" />
						</td>
					</tr>
					<tr> 
						<td>&nbsp;</td>
						<td valign="middle"> 
							<input type="submit" name="submit" value="{ addtxt }" />
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
	<br />
</form>
<!--#end categorycreate -->


<!--#begin delegatcreate -->
<script type="text/javascript">
//<![CDATA[
var op = null;
function openpopupgrp(url)
{
if( op == null || op.closed )
	op = this.open(url+'&cb=onApprovergroup', 'babgrouplist', 'width=300,height=400,status=no,resizable=yes,top=200,left=200,scrollbars=yes');
else
	op.focus();
}

function onApprovergroup(id, fn)
{
document.forms.dgcreate.grpm_display.value=fn;
document.forms.dgcreate.grpm.value=id;
this.focus();
op.close();
}

function evtSetColor(color)
	{
	var f = document.forms['dgcreate'];
	f.color.value = color;
	if (color == '') color = 'fff';
	document.getElementById('evtColor').style.backgroundColor = '#'+color;
	}

function ovidentia_optionsdelegations_onCheckAll(state){
	for (i = 0; i < document.forms.dgcreate.elements.length; i++) {
		if (document.forms.dgcreate.elements[i].name == 'delegitems[]' || document.forms.dgcreate.elements[i].name == 'battach') {
			document.forms.dgcreate.elements[i].checked = state;
		}
	}
}

//]]>
</script>
<form name="dgcreate" enctype="multipart/form-data" method="post" action="{ babPhpSelf }">
	<input type="hidden" name="MAX_FILE_SIZE" value="{ iMaxImgFileSize }" />
	<input type="hidden" name="tg" value="{ tgval }" />
	<input type="hidden" name="idx" value="list" />
	<input type="hidden" name="id" value="{ id }" />
	<input type="hidden" name="add" value="{ what }" />
	<table  width="80%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center" valign="middle"> 
				<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
					<tr> 
						<td width="30%" align="right">{ name }:</td>
						<td> 
							<input type="text" name="gname" size="45" maxlength="255" value="{ grpname }" />
						</td>
					</tr>
					<tr> 
						<td align="right">{ description }:</td>
						<td> 
							<input type="text" name="description" size="45" maxlength="255" value="{ grpdesc }" />
						</td>
					</tr>
					<tr id="color_tr"> 
						<td align="right">{ t_color }:</td>
						<td nowrap="nowrap"> 
							<div id="evtColor" style="width:30px;height:15px;border:#000 1px solid;background-color:#<!--#if colorvalue -->{ colorvalue }<!--#else colorvalue -->fff<!--#endif colorvalue -->;float:left"></div><input type="hidden" name="color" value="{ colorvalue }" />
							&nbsp;<a href="#" onclick="Start('{ babUrlScript }?tg=selectcolor&amp;idx=popup&amp;callback=evtSetColor', 'ColorWindow', 'width=400,height=400,status=no,resizable=no,top=200,left=200');return false;"><img src="{ babSkinPath }images/Puces/colorize.png" alt="" border="0" /></a> &nbsp;<a href="" onclick="evtSetColor('');return false;"><img src="{ babSkinPath }images/Puces/del.gif" alt="" border="0" /></a>
						</td>
					</tr>
					<!--#if bImageUploadEnable  -->					
					<tr> 
						<td align="right">{ sSelectImageCaption }</td>
						<td>
							<input type="file" id="delegPicture" name="delegPicture" />
						</td>
					</tr>
						<!--#if bImageAlreadyUploaded  -->		
						<tr> 
							<td align="right">{ sImageAlreadyUploaded }:</td>
							<td>
								<div style="position: relative;width: 100%;">
									<img alt="{ sImageName }" src="{ sImageURL }">
									<div style="position: absolute;top: 3px;left: 0px;width: 100%;">
										<a onclick="return confirm('{ sImageRemoveConfirm }')" style="background: url('ovidentia/skins/ovidentia/images/22x22/stop.png') no-repeat rgb(0.5, 0.5, 0.5); background: url('ovidentia/skins/ovidentia/images/22x22/stop.png') no-repeat rgba(0, 0, 0, 0.5); color: white; padding:3px 10px 5px 22px;" href="{ sImageRemoveUrl }">{ sImageRemove }</a>
									</div>
								</div>
							</td>
						</tr>
						<!--#endif bImageAlreadyUploaded  -->		
					<!--#else bImageUploadEnable -->
					<tr>
						<td colspan="2">
							<div class="error">
								{ sDisabledUploadReason }
							</div>
						</td>
					</tr>
					<!--#endif bImageUploadEnable -->
					
				<!--#if bCategoriesAvailable -->
					<tr>
						<td align="right">{ sCategoryCaption }</td>
						<td> 
							<select name="iIdCategory">
								<option value="0"></option>
							<!--#in getNextCategory -->
								<option style="background-color: #{ sCategoryColor }" value="{ iIdCategory }" { sCategorySelected } title="{ sCategoryDesc }">{ sCategoryName }</option>
							<!--#endin getNextCategory -->
							</select>
						</td>
					</tr>
				<!--#endif bCategoriesAvailable -->
					
					<tr>
						<td align="right">&nbsp;{ functions }:</td>
						<td>&nbsp;</td>
					</tr>
					
				<!--#in getnext -->
					<tr> 
						<td align="right">
							<input type="checkbox" name="delegitems[]" value="{ delegitem }" { checked } />
						</td>
						<td>{ delegitemdesc }</td>
					</tr>
				<!--#endin getnext -->
					<tr>
						<td align="right">
							<a href="#" onclick="ovidentia_optionsdelegations_onCheckAll(true);return false;"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ tcheck }" border="0"></a>
							<a href="#" onclick="ovidentia_optionsdelegations_onCheckAll(false);return false;"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ tuncheck }"  border="0"></a>
						</td>
						<td align="left">&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
					</tr>
					<tr> 
						<td align="center" colspan="2">{ grp_members } : </td>
					</tr>
					<tr>
						<td align="center" colspan="2"> 
							<select name="group">
								<option value="NULL"></option>
						<!--#in getnextgroup -->
								<option value="{ arrgroups[id] }" <!--#if arrgroups[select] --> selected="selected" <!--#endif arrgroups[select] -->>{ arrgroups[name] }</option>
						<!--#endin getnextgroup -->
							</select>
						<br />
						<br />
						</td>
					</tr>
					<tr> 
						<td>&nbsp;</td>
						<td> 
							<input type="submit" name="submit" value="{ add }" />
					<!--#if bdel -->
							&nbsp;&nbsp;<input type="submit" name="deleteg" value="{ delete }" />
					<!--#else bdel -->
					<!--#if control -->
							<input type="button" name="deleteg" value="{ delete }" onclick="alert('{ alert_msg }');" />
					<!--#endif control -->
					<!--#endif bdel -->
							<br />
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
<br />
<!--#end delegatcreate -->


<!--#begin delegatdelete -->

<form name="dgcreate" method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="delegat" />
<input type="hidden" name="idx" value="list" />
<input type="hidden" name="id" value="{ id }" />
<input type="hidden" name="action" value="delete" />
<table  width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground" align="center" valign="middle"> 
	<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
		<tr> 
		<td>
			<h3>{ title }</h3>
			<p>{ message }?</p>
			<p>
				<input type="radio" name="doaction" value="0" checked="checked" /> { t_delete_all }<br />
				<input type="radio" name="doaction" value="1" /> { t_set_to_admin }<br />
			</p>

			<p align="center"><input type="submit" value="{ t_confirm }" /></p>
		</td>
		</tr>
	</table>
</td>
</tr>
</table>
</form>
<!--#end delegatdelete -->


<!--#begin delegatmembers -->
<form name="listform" method="post" action="{ babPhpSelf }">
	<input type="hidden" name="tg" value="delegat" />
	<input type="hidden" name="idx" value="mem" />
	<input type="hidden" name="id" value="{ id }" />
	<input type="hidden" name="action" value="del" />
	<table  width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center" valign="middle"> 
				<table  width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td>{ fullname }</td>
					<td width="4%">&nbsp;</td>
				</tr>
				<!--#in getnext -->
				<tr class="BabSiteAdminFontBackground"> 
					<td>{ fullnameval }</td>
					<td><input type="checkbox" name="users[]" value="{ userid }" /></td>
				</tr>
				<!--#endin getnext -->
				<tr class="BabSiteAdminTitleFontBackground"> 
					<td>&nbsp;</td>
					<td align="center" nowrap="nowrap"><a href="#" onclick="onCheckAll('users', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" border="0" /></a><a href="#" onclick="onCheckAll('users', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }"  border="0" /></a></td>
				</tr>
				</table>
			</td>
		</tr>
	</table>
	<div align="center"><br /><input type="submit" name="submit" value="{ delusers }" /></div>
</form>
<br />
<br />
<script type="text/javascript">
//<![CDATA[
	function onApprover(id, fn)
	{
	document.forms.ucreate.nuser.value=fn;
	document.forms.ucreate.nuserid.value=id;
	this.focus();
	op.close();
	}
	
	var op = null;
	function openPopup(url)
	{
	if( op == null || op.closed )
		op = this.open(url+'&cb=onApprover', 'babuserslist', 'width=550,height=550,status=no,resizable=yes,top=200,left=200,scrollbars=yes');
	else
		op.focus();
	}
//]]>
</script>
<form name="ucreate" method="post" action="{ babPhpSelf }">
	<input type="hidden" name="tg" value="delegat" />
	<input type="hidden" name="idx" value="mem" />
	<input type="hidden" name="id" value="{ id }" />
	<input type="hidden" name="action" value="add" />
	<table  width="60%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr> 
			<td class="BabLoginCadreBackground" align="center" valign="middle"> 
				<table class="BabLoginMenuBackground"  width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
					<tr> 
						<td align="right">{ usertxt } :</td>
						<td> 
							<input type="text" name="nuser" size="40" maxlength="255" value="" disabled="disabled" />
							<input type="hidden" name="nuserid" value="" />&nbsp;<a href="#" onclick="openPopup('?tg=users&amp;idx=brow&amp;cb=');return false;"><img src="{ babInstallPath }skins/ovidentia/images/Puces/head.gif" alt="{ usertxt }" border="0" style="valign:absmiddle" /></a>
						</td>
					</tr>
					<tr> 
						<td>&nbsp;</td>
						<td> 
							<input type="submit" name="submit" value="{ addtxt }" />
						<br />
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
<!--#end delegatmembers -->

